<script setup lang="ts">
import {useRoute} from "vue-router";
import {ref} from "vue";

const route=useRoute();
const user=ref(
    {
      editKey:route.query.editKey,
      currentValue:route.query.currentValue,
      label:route.query.label
    }
)
const onSubmit =(values)=>{
  console.log(values)
}
</script>

<template>
  <van-form @submit="onSubmit">
    <van-cell-group inset>
      <van-field
          v-model="user.currentValue"
          :name="user.editKey"
          :label="user.label"
          :placeholder="`请输入${user.editKey}`"

      />

    </van-cell-group>
    <div style="margin: 16px;">
      <van-button round block type="primary" native-type="submit">
        提交
      </van-button>
    </div>
  </van-form>
</template>

<style scoped>

</style>